package cn.kwq.project_manger.pojo.dto;

import cn.kwq.project_manger.pojo.Resume;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "插入或更改简历")
public class AddResumeDto {
    @ApiModelProperty("简历名字")
    private String resumeName;
    @ApiModelProperty("联系方式")
    private String connect;

    //长处
    @ApiModelProperty("长处")
    private String forte;
    //意向
    @ApiModelProperty("意向")
    private String intention;

    public Resume getResume(Long resumeId,Long userId){
        if (resumeId!=null){
            return Resume
                    .builder()
                    .resumeName(this.resumeName)
                    .connect(this.connect)
                    .forte(this.forte)
                    .intention(this.intention)
                    .resumeId(resumeId)
                    .userId(userId)
                    .build();
        }else {
            return Resume
                    .builder()
                    .resumeName(this.resumeName)
                    .connect(this.connect)
                    .forte(this.forte)
                    .intention(this.intention)
                    .userId(userId)
                    .build();
        }

    }

}
